<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.js"></script>
</head>
<body>
<div id="div_id">
    <my-cpn></my-cpn>
</div>

<script>
    //1.创建组件构造器
    const cpnC=Vue.extend({
        template:`<div><p>1111111</p><p>2222222</p></div>`
    });
    //2.注册组件(全局组件)
    Vue.component('my-cpn',cpnC);
    const app=new Vue({
        el:"#div_id"
    })
</script>
</body>
</html>